package it.unina.loquendo;

//import java.io.RandomAccessFile;

import android.util.Log;

public class MyLogger 
{
	private static final String LOGTAG = "MyLogger";
	
	//RandomAccessFile m_oLogFile;
	
	public MyLogger(String szLogFile)
	{
		/*
		m_oLogFile = null;
		try
		{
			m_oLogFile = new RandomAccessFile(szLogFile, "rw");
		}
		catch(Exception oException)
		{
			System.out.println("Unable to open log file '" + szLogFile + "' for writing.");
		}
		*/
	}
	
	public void Release()
	{
		/*
		try
		{
			if (m_oLogFile != null) m_oLogFile.close();
			m_oLogFile = null;
		}
		catch(Exception oException)
		{
			System.out.println("Unable to close log file.");
		}
		*/
	}

	public void WriteLog(String logTag, String szLine)
	{
		Log.i(logTag, szLine);
		/*
		if (m_oLogFile != null)
		{
			try { m_oLogFile.writeBytes(szLine + "\n"); }
			catch(Exception oException) {}
		}
		else System.out.println(szLine);
		*/
	}

	public void WriteLog(String szLine)
	{
		Log.i(LOGTAG, szLine);
		/*
		if (m_oLogFile != null)
		{
			try { m_oLogFile.writeBytes(szLine + "\n"); }
			catch(Exception oException) {}
		}
		else System.out.println(szLine);
		*/
	}
}
